const state = {
    searchList: {}
}
const actions = {
    async getSearchInfo({ commit }, data = {}) {
        let result = await reqGetSearchInfo(data)
        if (result.status === 200) {
            commit("GETSEARCHINFO",result.data.data)
        }
    }
}
const mutations = {
    GETSEARCHINFO(state,data) {
        state.searchList = data;
    }
}
const getters = {
    goodsList(state) {
        return state.searchList.goodsList || []
    },
    attrsList(state) {
        return state.searchList.attrsList || []
    },
    trademarkList(state) {
        return state.searchList.trademarkList || []
    }
}
import { reqGetSearchInfo } from "@/api"
export default {
    state,
    mutations,
    actions,
    getters
}